<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
    <title>人才联盟平台</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="{{URL::asset('index/css/public.css')}}" />
    <script src="{{ URL::asset('index/js/jquery-1.10.2.min.js')}}" type="text/javascript"></script>
    <script type="text/javascript" src="{{ URL::asset('index/js/superslide.2.1.js')}}"></script>
    <script type="text/javascript" src="{{ URL::asset('index/js/carouFredSel.js')}}"></script>
    <link rel="shortcut icon" href="{{asset('images/favicon.ico')}}" type="image/x-icon" />
</HEAD>


<body>

<div class="pt_w1200">

   @include('index.top')


    <div class="pt_mbx mar_t10">
        <a href="{{url('')}}">首页</a><i>></i>新闻列表
    </div>

    <a href="#" class="pt_gg mar_t10"><img src="{{url('index/images/list_img.jpg')}}" class="pt_img" /></a>

    @if($articles->count()==0)
        <p style="text-align: center;font-size: 14px;color: #999;margin-top: 40px;">无相关信息</p>
    @endif

    <div class="pt_news_blist mar_t30 pt_newslist">
        <ul>
            @foreach($articles as $k=>$v)
                <li>
                    <a href="{{url('api/detail?id='.$v->id)}}"><i></i>{{$v->title}}</a>
                    <span>{{$v->created_at->format('Y-m-d')}}</span>
                </li>
                @endforeach

        </ul>
    </div>

    <div>
        {{ $articles->links() }}
    </div>




    <div class="mar_t10" style="height:50px;">
        <div id="demo7"></div>
    </div>


    @include('index.link')


</div>

@include('index.contact')

<script type="text/javascript">


    //获取url中的参数
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg); //匹配目标参数
        if (r != null) return unescape(r[2]); return null; //返回参数值
    }


    $(function(){
        $('.pagination').find('a').each(function(){
           var url=$(this).attr('href');
           url=url+'&&user='+getUrlParam("user");
            $(this).attr('href',url);
        });

    });
</script>
</body>
</html>